Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(php): add agent installation logic to operator #79

Merged
merged 6 commits into from
Sep 4, 2024

Conversation

bduranleau-nr
Copy link
Contributor

@bduranleau-nr bduranleau-nr commented Jul 31, 2024

Description

Adds support for the PHP Agent Operator.

For PHP, we need to emulate some of the aspects of the typical newrelic-install.sh script that the base PHP agent relies on in order to avoid having to inject commands into the application container itself. This logic requires the addition of an annotation (unique to PHP) that requires the user to define the PHP version of the application they intend to instrument. The installation logic will be handled in the initContainer itself, installing the appropriate agent and daemon artifacts, configuration file, and log directories in the shared volume /newrelic-instrumentation. When the application pod starts up, the PHP_INI_SCAN_DIR variable will be injected from the operator into the application container which will instruct the PHP binary on the customer system to search for the INI in the shared volume created by the initContainer, allowing for instrumentation.

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • New feature / enhancement (non-breaking change which adds functionality)
  • Security fix
  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • Documentation has been updated
  • This change requires changes in testing:
    • unit tests
    • E2E tests

Copy link

codecov bot commented Jul 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.43%. Comparing base (dbd7f5a) to head (2c0549a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #79   +/-   ##
=======================================
  Coverage   47.43%   47.43%           
=======================================
  Files          13       13           
  Lines         976      976           
=======================================
  Hits          463      463           
  Misses        448      448           
  Partials       65       65           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bduranleau-nr bduranleau-nr marked this pull request as ready for review August 1, 2024 18:22
@bduranleau-nr bduranleau-nr requested a review from a team as a code owner August 1, 2024 18:22
@bduranleau-nr bduranleau-nr requested review from a team, mfulb and lavarou August 1, 2024 18:22
src/apm/php.go Show resolved Hide resolved
src/apm/php.go Show resolved Hide resolved
@bduranleau-nr bduranleau-nr requested a review from a team as a code owner August 7, 2024 20:19
@bduranleau-nr bduranleau-nr requested a review from a team as a code owner August 7, 2024 20:19
Copy link
Contributor

@ramkrishankumarN ramkrishankumarN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dbudziwojskiNR dbudziwojskiNR requested review from a team and removed request for a team and lavarou August 28, 2024 20:00
@ramkrishankumarN ramkrishankumarN merged commit 60cf64c into main Sep 4, 2024
17 checks passed
@ramkrishankumarN ramkrishankumarN deleted the php/refactor-agent-injection branch September 4, 2024 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants